package com.itheima.controller;

import com.itheima.domain.User;
import com.itheima.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @DubboReference(timeout = 5000,retries = 2)
    private UserService userService;

    @GetMapping("/user")
    public User findById(Integer id) {
        return userService.findById(id);
    }
}
